package com.iotechn.unimall.app.api.integralactivity;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.exception.ServiceException;

import java.text.ParseException;
import java.util.Map;

/**
 * 签到接口
 */
@HttpOpenApi(group = "signintegral", description = "签到接口")
public interface SignIntegralService {

    @HttpMethod(description = "判断今天是否已签到")
    public Boolean isSign(
            @HttpParam(name = "userId", type = HttpParamType.USER_NO_ID, description = "用户Id") Long userId
    ) throws ServiceException;


    @HttpMethod(description = "签到")
    public Map<String,Object> sign(
            @HttpParam(name = "userId", type = HttpParamType.USER_NO_ID, description = "用户Id") Long userId
    ) throws ServiceException;

    @HttpMethod(description = "获取连续签到信息")
    public Map<String,Object> getContinueSign(
            @HttpParam(name = "userId", type = HttpParamType.USER_NO_ID, description = "用户Id") Long userId
    ) throws ServiceException, ParseException;


    @HttpMethod(description = "获取当月的签到信息")
    public Map<String,Object> getCurrMonthSignLog(
            @HttpParam(name = "timeInfo", type = HttpParamType.COMMON, description = "时间") String timeInfo,
            @HttpParam(name = "userId", type = HttpParamType.USER_NO_ID, description = "用户Id") Long userId
    ) throws ServiceException, ParseException;


}
